<!--<?php
if (!defined('AJAX')){include_once PrintEot('left');}
print <<<EOT
-->
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript" src="js/global.js"></script>
<script src="mode/house/js/second.js"></script>
<script type="text/javascript">
function HTMLDecode2(str){  
  var s = "";
  if(str.length == 0)   return "";
  s    =    str.replace(/&amp;/g,"&");
  s    =    s.replace(/&lt;/g,"<");
  s    =    s.replace(/&gt;/g,">");
  s    =    s.replace(/&nbsp;/g," ");
  s    =    s.replace(/&#39;/g,"\'");
  s    =    s.replace(/&quot;/g,"\"");
  return   s;  
}
function changeNewPlate(){
	var plate = eval( '(' + ajax.request.responseText + ')' );
	getObj('plate').length = 0;
	if(plate.length==0){
		getObj('plate_tr').style.display = "none";
		return;
	}
	getObj('plate').options.add(new Option('',''));
	getObj('plate_tr').style.display = "";
	for(key in plate){
		getObj('plate').options.add(new Option(HTMLDecode2(plate[key]),key));
	}
}

</script>
<!--
EOT;
if (empty($action)) {print <<<EOT
-->
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li class="current"><a href="$basename" hidefocus="true">楼盘管理</a></li>
    </ul>
</div>
<form action="$basename&" method="post">
<h2 class="h1"><span class="fl mr10">搜索条件</span></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td2">楼盘名称 <input type="text" name="name" class="input input_wa" value="$name"/></td>
		<td class="td2">
			开发商
			<select name="developer" class="select_wa">
				<option></option>
<!--
EOT;
foreach ($developerdb as $key => $value) {
$_selected = $value[id] == $developer ? 'selected' : '';
print <<<EOT
-->
				<option value="{$value[id]}" $_selected>{$value[name]}</option>
<!--
EOT;
}print <<<EOT
-->
			</select>
		</td>
		<td class="td2">
			所属区域
			<select name="area"  class="select_wa" onchange="ajax.send('$basename&action=getplate&area='+this.value,'',changeplate)">
				<option></option>
<!--
EOT;
foreach ($areaField as $key => $value) {
$_selected = $key == $area ? 'selected' : '';
print <<<EOT
-->
				<option value="$key" $_selected>{$value}</option>
<!--
EOT;
}print <<<EOT
-->
			</select>
		</td>
		<td class="td2">
			<select class="select_wa" name="plate" id="platetype">
			<option value="">所有板块</option>
<!--
EOT;
foreach($plates as $key=>$value){
$select = ($plate == $key) ? 'selected' : '';
print <<<EOT
-->		
			<option value="{$key}" {$select}>{$value}</option>
<!--
EOT;
}
print <<<EOT
-->
			</select>
		</td>
		
		
	</tr>
	<tr class="tr1 vt">
		<td class="td2">
			销售状态
<!--
EOT;
${'_selected_'.$status} = 'selected';
print <<<EOT
-->
			<select name="status">
				<option></option>
				<option value="1" $_selected_1>新盘</option>
				<option value="2" $_selected_2>在售</option>
				<option value="3" $_selected_3>尾盘</option>
				<option value="4" $_selected_4>售空</option>
			</select>
		</td>
		<td class="td2">
			状　态
<!--
EOT;
${'_ifopen_'.$ifopen} = 'selected';
print <<<EOT
-->
			<select name="ifopen">
				<option></option>
				<option value="1" $_ifopen_1>启用</option>
				<option value="2" $_ifopen_2>停用</option>
			</select>
		</td>
		<td class="td2" colspan="2"><span class="bt2"><span><button type="submit" onfocus="blur();">查找</button></span></span></td>
	</tr>
</table>
</div>
</form>

<form action="$basename&" method="post" name="FORM">
<input type="hidden" name="step" value="2">
<h2 class="h1"><span class="fl mr10">楼盘管理</span><a class="btn_add fl cp" href="$basename&action=add"><i>添加楼盘</i></a><span> <span class="fr">[共{$totalCount}条结果]</span></h2>
<div class="admin_table mb10 cc">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr2 vt">
		<td width="40"><span onclick="CheckAll(document.FORM);" class="cp">全选</span></td>
		<td>楼盘名称</td>
		<td>均价</td>
		<td>开发商</td>
		<td>所属区域</td>
		<td>销售状态</td>
		<td>状态</td>
		<td>推荐</td>
		<td>操作</td>
	</tr>
<!--
EOT;
if(count($infodb)){
$status_lang = array(1 => '新盘', 2 => '在售', 3 => '尾盘', 4 => '售空');
foreach ($infodb as $key => $value) {print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td2"><input type="checkbox" name="selid[]" value="$value[hid]" /></td>
		<td class="td2"><a href="{$houseBaseUrl}q=info&hid=$value[hid]" target="_blank">$value[name]</a></td>
		<td class="td2">
<!--
EOT;
if ($value['aveprice']) {print <<<EOT
-->
			{$value['aveprice']} 元/平米
<!--
EOT;
} else {print <<<EOT
-->
			待定
<!--
EOT;
}print <<<EOT
-->
		</td>
		<td class="td2">{$developerdb[$value['developer']]['name']}</td>
		<td class="td2">{$areaField[$value['area']]}</td>
		<td class="td2">{$status_lang[$value['status']]}</td>
		<td class="td2">
<!--
EOT;
if ($value['ifopen']) {print <<<EOT
-->
			<span class="s3">启用</span>
<!--
EOT;
} else {print <<<EOT
-->
			<span class="s1">停用</span>
<!--
EOT;
}print <<<EOT
-->
		</td>
		<td class="td2">
<!--
EOT;
if ($value['recommend']) {print <<<EOT
-->
		<span class="s2">是</span>
<!--
EOT;
} else {print <<<EOT
-->
		否
<!--
EOT;
}print <<<EOT
-->
		</td>
		<td class="td2"><a href="$basename&action=edit&hid={$value['hid']}">[编辑]</a></td>
	</tr>
<!--
EOT;
}
}else{
print <<<EOT
-->
<tr><td class="p10" colspan="9"><div class="admin_tips">啊哦，没有你要的信息！</div></td></tr>
<!--
EOT;
}
print <<<EOT
-->	
</table>
</div>
<div class="mb10 cc">
$pages
</div>
<div class="mb10 tac">
    <p class="mb10">操作<input type="radio" name="job" value="open" checked />启用 <input type="radio" name="job" value="close" />停用 <input type="radio" name="job" value="recommend" />设为推荐 <input type="radio" name="job" value="unrecommend" />取消推荐 <input type="radio" name="job" value="del" />删除</p>
    <p>
    <span class="bt"><span><button type="button" onclick="CheckAll(document.FORM);" onfocus="blur();">全选</button></span></span>
	<span class="btn"><span><button type="submit" onfocus="blur();" onclick="return confirm('是否确认该操作？')">提 交</button></span></span>
    </p>
</div>
<!-- </div>
<center><input type="submit" value="提 交" class="btn"></center><br/> -->
</form>
<!--
EOT;
} elseif ($action == 'add' || $action == 'edit') {print <<<EOT
-->
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
<!--
EOT;
if ($action == 'add') {print <<<EOT
-->
		<li class="current"><a href="$basename&action=add" hidefocus="true">添加楼盘</a></li>
<!--
EOT;
} else {print <<<EOT
-->
		<li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">编辑楼盘</a></li>
<!--
EOT;
}print <<<EOT
-->
    </ul>
</div>

<!--
EOT;
if ($action == 'edit') {print <<<EOT
-->
<div class="nav4 mb10">
    <ul class="cc">
        <li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">基本信息</a></li>
		<li><a href="$basename&action=album&hid=$hid" hidefocus="true">相册</a></li>
        <li><a href="$basename&action=video&hid=$hid" hidefocus="true">视频</a></li>
		<li><a href="$basename&action=map&hid=$hid" hidefocus="true">地图</a></li>
		<li><a href="$basename&action=pricedetail&hid=$hid" hidefocus="true">价格明细</a></li>
		<li><a href="$basename&action=feed&hid=$hid" hidefocus="true">楼盘动态</a></li>
		<li><a href="$basename&action=colony&hid=$hid" hidefocus="true">关联业主小区</a></li>
		<li><a href="$basename&action=information&hid=$hid" hidefocus="true">关联资讯</a></li>
		<li><a href="$basename&action=nav&hid=$hid" hidefocus="true">自定义导航</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_groupbuy&action=stats&hid=$hid" hidefocus="true">团购管理</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_evaluation&hid=$hid&action=score" hidefocus="true">评价管理</a></li>
	</ul>
</div>
<!--
EOT;
}print <<<EOT
-->
<form action="$basename&action=$action" enctype="multipart/form-data" method="post">
<input type="hidden" name="step" value="2">
<input type="hidden" name="hid" value="$hid">
<h2 class="h1"><span class="fl mr10">基本信息</span></h2>
<script type="text/javascript" src="js/date.js"></script>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">楼盘名称<font color="red">*</font></td>
		<td class="td2"><input type="text" name="name" value="$rt[name]" class="input input_wa" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">楼盘LOGO</td>
		<td class="td2">
			<input type="file" name="logo" class="input" />
<!--
EOT;
if ($rt['logo']) {print <<<EOT
-->
			<span id="h-logo"><img src="$logo[0]?t=$timestamp" height="60" /> <a href="$basename&action=dellogo&hid=$hid" onclick="ajax.send(this.href,'',dellogo);return false;">[删]</a></span>
<script type="text/javascript">
function dellogo() {
	if (ajax.request.responseText == 'ok') {
		getObj('h-logo').style.display = 'none';
	} else {
		ajax.guide();
	}
}
</script>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">楼盘Banner</td>
		<td class="td2">
			<input type="file" name="banner" class="input" />
<!--
EOT;
if ($rt['banner']) {print <<<EOT
-->
			<span id="h-banner"><img src="$banner[0]?t=$timestamp" height="60" /> <a href="$basename&action=delbanner&hid=$hid" onclick="ajax.send(this.href,'',delbanner);return false;">[删]</a></span>
<script type="text/javascript">
function delbanner() {
	if (ajax.request.responseText == 'ok') {
		getObj('h-banner').style.display = 'none';
	} else {
		ajax.guide();
	}
}
</script>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">物业类型</td>
		<td class="td2">
<!--
EOT;
foreach ($propertyField as $key => $value) {
$ifcheck = ($rt['property'] & (1 << ($key-1))) ? ' checked' : '';
print <<<EOT
-->
			<input type="checkbox" name="property[]" value="$key"{$ifcheck} />$value
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">建筑类型</td>
		<td class="td2">
<!--
EOT;
foreach ($buildtypeField as $key => $value) {
$ifcheck = ($rt['buildtype'] & (1 << ($key-1))) ? ' checked' : '';
print <<<EOT
-->
			<input type="checkbox" name="buildtype[]" value="$key"{$ifcheck} />$value
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">所属区域</td>
		<td class="td2">
			<select name="area" onchange="ajax.send('$basename&action=getplate&area='+this.value,'',changeNewPlate)">
				<option></option>
<!--
EOT;
foreach ($areaField as $key => $value) {
$ifcheck = ($key == $rt['area']) ? ' selected' : '';
print <<<EOT
-->
				<option value="$key"{$ifcheck}>$value</option>
<!--
EOT;
}
$style = ($action == 'add') ? 'display:none' : '';
print <<<EOT
-->
			</select>
		</td>
	</tr>
	<tr class="tr1 vt" id="plate_tr"  style="{$style}">
		<td class="td1">所属板块</td>
		<td class="td2">
			<select name="plate" id="plate">
<!--
EOT;
foreach ($plateField as $key => $value) {
$ifcheck = ($key == $rt['plate']) ? ' selected' : '';
print <<<EOT
-->
				<option value="$key"{$ifcheck}>$value</option>
<!--
EOT;
}print <<<EOT
-->
			</select>
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">交付标准</td>
		<td class="td2">
			<!-- <input type="checkbox" name="" />精装修 <input type="checkbox" name="" />毛坯 -->
<!--
EOT;
foreach ($fitmentField as $key => $value) {
$ifcheck = ($rt['paystatus'] & (1 << ($key-1))) ? ' checked' : '';
print <<<EOT
-->
			<input type="checkbox" name="paystatus[]" value="$key"{$ifcheck} />$value
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">楼盘地址</td>
		<td class="td2"><input type="text" name="address" value="$rt[address]" class="input input_wb" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">售楼热线</td>
		<td class="td2"><input type="text" name="saletele" value="$rt[saletele]" class="input input_wa" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">售楼地址</td>
		<td class="td2"><input type="text" name="saleaddress" value="$rt[saleaddress]" class="input input_wb" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">开发商</td>
		<td class="td2">
			<select name="developer" class="select_wa" />
				<option></option>
<!--
EOT;
foreach ($developerdb as $key => $value) {
$selected = $rt['developer'] == $key ? ' selected' : '';
print <<<EOT
-->
				<option value="$key"{$selected}>$value</option>
<!--
EOT;
}print <<<EOT
-->
			</select>
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">参考均价</td>
		<td class="td2"><input type="text" name="aveprice" value="$rt[aveprice]" class="input input_wa" /> 元/平米</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">楼盘类型</td>
		<td class="td2">
			<select name="housetype">
				<option></option>
<!--
EOT;
foreach ($housetypeField as $key => $value) {
$ifcheck = ($key == $rt['housetype']) ? ' selected' : '';
print <<<EOT
-->
				<option value="$key"{$ifcheck}>$value</option>
<!--
EOT;
}print <<<EOT
-->
			</select>
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">销售状态</td>
		<td class="td2">
			<select name="status" style="width:80px">
<!--
EOT;
foreach ((array)$buildStatus as $key => $value) {
$selected = $rt['status'] == $key ? ' selected' : '';
print <<<EOT
-->			
			
				<option value="$key" {$selected}>$value</option>
<!--
EOT;
$isdimopendate = $rt[isdimopendate] ? 'checked="checked"' : '';
$isdimdeliverdate = $rt[isdimdeliverdate] ? 'checked="checked"' : '';
}print <<<EOT
-->	
				
			</select>
		</td>
	</tr>
<!--</table>
</div>
<script type="text/javascript" src="js/date.js"></script>
<h2 class="h1"><span class="fl mr10">详细信息</span></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">-->
	<tr class="tr1 vt">
		<td class="td1">销售许可</td>
		<td class="td2"><input type="text" name="sellinglicense" value="$rt[sellinglicense]" class="input input_wb" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">开盘日期</td>
		<td class="td2"><input type="text" name="opendate" id="opendate" value="$rt[opendate]" class="input input_wa" onclick="ShowCalendar(this.id)" />&nbsp;&nbsp;&nbsp;
		<input type="checkbox" value="1" $isdimopendate name="isdimopendate"/>&nbsp;显示为模糊时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;选中“显示为模糊时间”将根据具体时间显示上旬、中旬、下旬</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">交付日期</td>
		<td class="td2"><input type="text" name="deliverdate" id="deliverdate" value="$rt[deliverdate]" class="input input_wa" onclick="ShowCalendar(this.id)" />&nbsp;&nbsp;&nbsp;
		<input type="checkbox" value="1" $isdimdeliverdate name="isdimdeliverdate"/>&nbsp;显示为模糊时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;选中“显示为模糊时间”将根据具体时间显示上旬、中旬、下旬</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">建筑面积</td>
		<td class="td2"><input type="text" name="buildingarea" value="$rt[buildingarea]" class="input input_wa" /> 平米</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">占地面积</td>
		<td class="td2"><input type="text" name="floorspace" value="$rt[floorspace]" class="input input_wa" /> 平米</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">绿化率</td>
		<td class="td2"><input type="text" name="greenratio" value="$rt[greenratio]" class="input input_wa" /> %</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">容积率</td>
		<td class="td2"><input type="text" name="plotratio" value="$rt[plotratio]" class="input input_wa" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">交通状况</td>
		<td class="td2"><input type="text" name="traffic" value="$rt[traffic]" class="input input_wb" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">车位数</td>
		<td class="td2"><input type="text" name="carport" value="$rt[carport]" class="input input_wa" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">车位费</td>
		<td class="td2"><input type="text" name="carportfee" value="$rt[carportfee]" class="input input_wa" /> 元/年</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">物业公司</td>
		<td class="td2"><input type="text" name="propertycompany" value="$rt[propertycompany]" class="input input_wa" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">物业费</td>
		<td class="td2"><input type="text" name="cleaningfee" value="$rt[cleaningfee]" class="input input_wa" /> 元/平米·月</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">周边配套</td>
		<td class="td2"><textarea name="peripheral" class="textarea">{$rt[peripheral]}</textarea></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">项目介绍</td>
		<td class="td2"><textarea name="introduction" class="textarea">{$rt[introduction]}</textarea></td>
	</tr>
</table>
</div>

<h2 class="h1"><span class="fl mr10">SEO信息</span></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">title</td>
		<td class="td2"><input type="text" name="seotitle" value="{$rt['seotitle']}" class="input input_wb" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">Meta Keywords</td>
		<td class="td2"><input type="text" name="seokeywords" value="{$rt['seokeywords']}" class="input input_wb" /></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">Meta Description</td>
		<td class="td2"><textarea name="seodescription" class="textarea">{$rt['seodescription']}</textarea></td>
	</tr>
</table>
</div>
<div class="mb10 tac"><span class="btn"><span><button type="submit" onfocus="blur();">保存</button></span></span></div>
</form>
<!--
EOT;
} elseif ($action == 'developer') {print <<<EOT
-->
<script language="JavaScript" src="js/global.js"></script>
<script language="JavaScript" src="js/pw_ajax.js"></script>
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
    </ul>
</div>

<form action="$basename&action=$action" method="post">
<h2 class="h1"><span class="fl mr10">搜索条件</span></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td2" width="280">开发商名称 <input type="text" name="name" class="input input_wa" /></td>
		<td class="td2" colspan="2"><span class="bt2"><span><button type="submit" onfocus="blur();">查找</button></span></span></td>
	</tr>
</table>
</div>
</form>

<form action="$basename&action=$action" method="post" name="FORM">
<input type="hidden" name="step" value="2">
<h2 class="h1"><span class="fl mr10">开发商信息管理</span><a class="btn_add fl cp" id="td_developer" onclick="read.open('menu_developer', this.id, 2)"><i>添加</i></a></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr2 vt">
		<td width="40"><span onclick="CheckAll(document.FORM);" class="cp">全选</span></td>
		<td>开发商名称</td>
		<td>公司地址</td>
		<td>联系电话</td>
		<td>操作</td>
	</tr>
<!--
EOT;
foreach ($devdb as $key => $value) {print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td2"><input type="checkbox" name="selid[]" value="$value[id]" /></td>
		<td class="td2">$value[name]</td>
		<td class="td2">$value[address]</td>
		<td class="td2">$value[tel]</td>
		<td class="td2"><a href="$basename&action=editdeveloper&id=$value[id]" id="developer_$value[id]" onclick="sendmsg(this.href,'',this.id);return false;">编辑</a> <a href="$basename&action=deldeveloper&id=$value[id]" id="deldeveloper_$value[id]" onclick="sendmsg(this.href,'',this.id);return false;">删除</a></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<div class="mb10 cc">
$pages
</div>
<div class="mb10 tac">
    <span class="bt"><span><button type="button" onclick="CheckAll(document.FORM);" onfocus="blur();">全选</button></span></span>
	<span class="btn"><span><button type="submit" onfocus="blur();">删 除</button></span></span>
</div>
</form>

<div id="menu_developer" class="menu" style="display:none">
<form action="$basename&action=adddeveloper" method="post">
	<div class="admin_table mb10" style="width:500px">
	<h2 class="h1" onmousedown="read.move(event);" style="cursor:move"><a class="del_img fr" href="javascript:;" onclick="closep();">关闭</a>添加开发商信息</h2>
	<table width="100%" cellspacing="0" cellpadding="0">
		<tr class="tr1 vt">
			<td class="td2">开发商名称</td>
			<td class="td2" colspan="3"><input type="text" name="name" class="input input_wb" /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">资质等级</td>
			<td class="td2" colspan="3"><input type="text" name="level" value="" class="input input_wb" /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">公司地址</td>
			<td class="td2" colspan="3"><input type="text" name="address" value="" class="input input_wb" /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">邮政编码</td>
			<td class="td2"><input type="text" name="zipcode" value="" class="input" size="14" /></td>
			<td class="td2">Email</td>
			<td class="td2"><input type="text" name="email" value="" class="input" size="13" /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">网址</td>
			<td class="td2" colspan="3"><input type="text" name="url" value="" class="input input_wb" /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">负责人</td>
			<td class="td2"><input type="text" name="principal" value="" class="input" size="14" /></td>
			<td class="td2">联系人</td>
			<td class="td2"><input type="text" name="linkman" value="" class="input" size="13" /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">联系电话</td>
			<td class="td2"><input type="text" name="tel" value="" class="input" size="14" /></td>
			<td class="td2">传真</td>
			<td class="td2"><input type="text" name="fax" value="" class="input" size="13" /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">公司简介</td>
			<td class="td2" colspan="3"><textarea name="introduction" class="textarea"></textarea></td>
		</tr>
	</table>
	</div>
	<div class="mb10 tac"><span class="btn2"><span><button type="submit" onfocus="blur();">提 交</button></span></span></div>
</form>
</div>
<!--
EOT;
} elseif ($action == 'feed') {print <<<EOT
-->
<script type="text/javascript" src="js/global.js"></script>
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript" src="js/date.js"></script>
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
		<li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">编辑楼盘</a></li>
    </ul>
</div>
<div class="nav4 mb10">
    <ul class="cc">
        <li><a href="$basename&action=edit&hid=$hid" hidefocus="true">基本信息</a></li>
		<li><a href="$basename&action=album&hid=$hid" hidefocus="true">相册</a></li>
        <li><a href="$basename&action=video&hid=$hid" hidefocus="true">视频</a></li>
		<li><a href="$basename&action=map&hid=$hid" hidefocus="true">地图</a></li>
		<li><a href="$basename&action=pricedetail&hid=$hid" hidefocus="true">价格明细</a></li>
		<li class="current"><a href="$basename&action=feed&hid=$hid" hidefocus="true">楼盘动态</a></li>
		<li><a href="$basename&action=colony&hid=$hid" hidefocus="true">关联业主小区</a></li>
		<li><a href="$basename&action=information&hid=$hid" hidefocus="true">关联资讯</a></li>
		<li><a href="$basename&action=nav&hid=$hid" hidefocus="true">自定义导航</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_groupbuy&action=stats&hid=$hid" hidefocus="true">团购管理</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_evaluation&hid=$hid&action=score" hidefocus="true">评价管理</a></li>
	</ul>
</div>

<form action="$basename&action=$action" method="post" name="FORM">
<input type="hidden" name="step" value="2">
<input type="hidden" name="hid" value="$hid">
<h2 class="h1"><span class="fl mr10">楼盘动态信息</span><span class="linka fl"><a class="btn_add" id="td_feed" onclick="read.open('menu_feed', this.id, 2)"><i>添加</i></a></span></h2>
<div class="admin_table mb10 cc">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr2 vt">
		<td width="40"><span onclick="CheckAll(document.FORM);" class="cp">全选</span></td>
		<td width="150">发布时间</td>
		<td>内容摘要</td>
		<td width="120">操作</td>
	</tr>
<!--
EOT;
foreach ($feeddb as $key => $value) {print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td2" width="40"><input type="checkbox" name="selid[]" value="{$value['id']}" /></td>
		<td class="td2" width="150">{$value['postdate']}</td>
		<td class="td2">{$value['descrip']}</td>
		<td class="td2" width="120"><a href="$basename&action=editfeed&id={$value['id']}" id="feed_{$value['id']}" onclick="sendmsg(this.href,'',this.id);return false;">[编辑]</a></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<div class="mb10 cc">
$pages
</div>
<div class="mb10 tac">
    <span class="bt"><span><button type="button" onclick="CheckAll(document.FORM);" onfocus="blur();">全选</button></span></span>
	<span class="btn"><span><button type="submit" onfocus="blur();">删 除</button></span></span>
</div>
</form>

<div id="menu_feed" class="menu" style="display:none">
<form action="$basename&action=addfeed" method="post">
<input type="hidden" name="hid" value="$hid" />
	<div class="admin_table mb10" style="width:500px">
	<h2 class="h1" onmousedown="read.move(event);" style="cursor:move"><a class="del_img fr" href="javascript:;" onclick="closep();">关闭</a>添加楼盘动态</h2>
	<table width="100%" cellspacing="0" cellpadding="0">
		<tr class="tr1 vt">
			<td class="td2">发布日期</td>
			<td class="td2"><input type="text" name="postdate" id="postdate" class="input input_wa" onclick="ShowCalendar(this.id,1)" /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">动态描述</td>
			<td class="td2"><textarea name="descrip" class="textarea"></textarea></td>
		</tr>
	</table>
	</div>
	<div class="mb10 tac"><span class="btn2"><span><button type="submit" onfocus="blur();">提 交</button></span></span></div>
</form>
</div>
<!--
EOT;
} elseif ($action == 'colony') {print <<<EOT
-->
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript" src="js/global.js"></script>
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
		<li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">编辑楼盘</a></li>
    </ul>
</div>

<div class="nav4 mb10">
    <ul class="cc">
        <li><a href="$basename&action=edit&hid=$hid" hidefocus="true">基本信息</a></li>
		<li><a href="$basename&action=album&hid=$hid" hidefocus="true">相册</a></li>
        <li><a href="$basename&action=video&hid=$hid" hidefocus="true">视频</a></li>
		<li><a href="$basename&action=map&hid=$hid" hidefocus="true">地图</a></li>
		<li><a href="$basename&action=pricedetail&hid=$hid" hidefocus="true">价格明细</a></li>
		<li><a href="$basename&action=feed&hid=$hid" hidefocus="true">楼盘动态</a></li>
		<li class="current"><a href="$basename&action=colony&hid=$hid" hidefocus="true">关联业主小区</a></li>
		<li><a href="$basename&action=information&hid=$hid" hidefocus="true">关联资讯</a></li>
		<li><a href="$basename&action=nav&hid=$hid" hidefocus="true">自定义导航</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_groupbuy&action=stats&hid=$hid" hidefocus="true">团购管理</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_evaluation&hid=$hid&action=score" hidefocus="true">评价管理</a></li>
	</ul>
</div>
<style type="text/css">
.list_160{width:500px;}
.list_160 li{width:160px;float:left;cursor:pointer}
</style>
<h2 class="h1"><span class="fl mr10">设置关联业主小区</span></h2>
<form action="$basename&action=setcolony" method="post">
<input type="hidden" name="hid" value="$hid" />
<input type="hidden" name="step" value="3" />
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">关联业主小区</td>
		<td class="td2" width="150">
<!--
EOT;
if ($rt['cyid']) {print <<<EOT
-->
			<span class="s2 f14 b">$cname</span>
<!--
EOT;
} else {print <<<EOT
-->
			<span>没有关联</span>
<!--
EOT;
}print <<<EOT
-->
		</td>
		<td class="td2">
			<span class="btn2"><span><button type="button" onfocus="blur();" id="td_colony" onclick="read.open('menu_colony', this.id, 2)">选择小区</button></span></span>
<!--
EOT;
if ($rt['cyid']) {print <<<EOT
-->
			<span class="bt2"><span><button type="submit" onfocus="blur();">取消关联</button></span></span>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
</table>
</div>
</form>

<div id="menu_colony" class="menu" style="display:none">
<form action="$basename&action=setcolony" method="post">
<input type="hidden" name="cyid" id="cyid" value="" />
<input type="hidden" name="hid" value="$hid" />
<input type="hidden" name="step" value="2" />
	<div class="admin_table mb10" style="width:540px">
	<h2 class="h1" onmousedown="read.move(event);" style="cursor:move"><a class="del_img fr" href="javascript:;" onclick="closep();">关闭</a>选择业主小区</h2>
	<table width="100%" cellspacing="0" cellpadding="0">
		<tr class="tr1 vt">
			<td class="td2">
				所属分类
				<select name="cid" id="cid" width="width:120px">
					<option>不分类</option>
<!--
EOT;
foreach ($cnclassdb as $key => $value) {print <<<EOT
-->
					<option value="{$value['fid']}">{$value['cname']}</option>
<!--
EOT;
}print <<<EOT
-->
				</select>
			</td>
			<td class="td2">
				群组名称(通配符*)<input type="text" class="input" size="12" name="cname" id="cname" />
			</td>
			<td class="td2">
				<span class="bt2"><span><button type="button" onfocus="blur();" onclick="searchColony();">查找</button></span></span>
			</td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2" colspan="3" id="searchList">
				<ul class="cc list_A list_160" id="cylist">
<!--
EOT;
foreach ($cydb as $key => $value) {print <<<EOT
-->
					<li id="cy_{$value['id']}" onclick="selectcy('{$value['id']}')">{$value['cname']}</li>
<!--
EOT;
}print <<<EOT
-->
				</ul>
<!--
EOT;
if ($total > $perpage) {print <<<EOT
-->
				<a class="fr cp mr10" href="$basename&action=setcolony&page=2" onclick="return selPage(this.href);">下一页</a>
<!--
EOT;
}print <<<EOT
-->
			</td>
		</tr>
	</table>
	</div>
	<div class="mb10 tac"><span class="btn2"><span><button type="submit" onfocus="blur();">提 交</button></span></span></div>
</form>
</div>

<script type="text/javascript">
function selectcy(id) {
	var list = getObj('cylist').getElementsByTagName('li');
	for (var i = 0; i < list.length; i++) {
		list[i].className = (list[i].id == 'cy_' + id) ? 'current' : '';
	}
	getObj('cyid').value = id;
}
function selPage(url) {
	ajax.send(url, '', function() {
		if (ajax.request.responseText != null && ajax.request.responseText.indexOf('<') != -1) {
			getObj('searchList').innerHTML = ajax.request.responseText;
		} else {
			closep();
			ajax.guide();
		}
	});
	return false;
}
function searchColony() {
	var data = 'cid=' + getObj('cid').value + '&cname=' + getObj('cname').value;
	ajax.send('{$basename}&action=setcolony&' + data, '', function() {
		if (ajax.request.responseText != null && ajax.request.responseText.indexOf('<') != -1) {
			getObj('searchList').innerHTML = ajax.request.responseText;
		} else {
			closep();
			ajax.guide();
		}
	});
}
</script>
<!--
EOT;
} elseif ($action == 'nav') {print <<<EOT
-->
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
		<li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">编辑楼盘</a></li>
    </ul>
</div>

<div class="nav4 mb10">
    <ul class="cc">
        <li><a href="$basename&action=edit&hid=$hid" hidefocus="true">基本信息</a></li>
		<li><a href="$basename&action=album&hid=$hid" hidefocus="true">相册</a></li>
        <li><a href="$basename&action=video&hid=$hid" hidefocus="true">视频</a></li>
		<li><a href="$basename&action=map&hid=$hid" hidefocus="true">地图</a></li>
		<li><a href="$basename&action=pricedetail&hid=$hid" hidefocus="true">价格明细</a></li>
		<li><a href="$basename&action=feed&hid=$hid" hidefocus="true">楼盘动态</a></li>
		<li><a href="$basename&action=colony&hid=$hid" hidefocus="true">关联业主小区</a></li>
		<li><a href="$basename&action=information&hid=$hid" hidefocus="true">关联资讯</a></li>
		<li class="current"><a href="$basename&action=nav&hid=$hid" hidefocus="true">自定义导航</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_groupbuy&action=stats&hid=$hid" hidefocus="true">团购管理</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_evaluation&hid=$hid&action=score" hidefocus="true">评价管理</a></li>
	</ul>
</div>

<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript" src="js/global.js"></script>
<script type="text/javascript" language="JavaScript" src="js/color_picker.js"></script>
<script type="text/javascript">
function pickReback(obj,color){
	if (typeof obj == 'string') {
		obj = getObj(obj);
	}
	obj.style.color = color;
}
</script>
<form action="$basename&action=$action" method="post" name="FORM">
<input type="hidden" name="step" value="2">
<input type="hidden" name="hid" value="$hid">
<h2 class="h1"><span class="fl mr10">自定义链接</span><span class="linka fl"><a class="btn_add" id="td_nav" onclick="read.open('menu_nav', this.id, 2)"><i>添加</i></a></span></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr2 vt">
		<td width="40"><span onclick="CheckAll(document.FORM);" class="cp">全选</span></td>
		<td width="120">顺序</td>
		<td>链接名称</td>
		<td>链接地址</td>
		<td width="120">操作</td>
	</tr>
<!--
EOT;
$i = 0;
foreach ($navdb as $key => $value) {
$i++;
print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td2"><input type="checkbox" name="selid[]" value="$key" /></td>
		<td class="td2"><input type="text" name="view[$key]" class="input" size="1" value="$i" /></td>
		<td class="td2">{$value['title']}</td>
		<td class="td2">{$value['link']}</td>
		<td class="td2"><a href="$basename&action=editnav&hid=$hid&id=$key" id="nav_$key" onclick="sendmsg(this.href,'',this.id);return false;">编辑</a></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<div class="mb10 cc">
$pages
</div>
<div class="mb10 tac">
    <span class="bt"><span><button type="button" onclick="CheckAll(document.FORM);" onfocus="blur();">全选</button></span></span>
	<span class="btn"><span><button type="submit" onfocus="blur();">提 交</button></span></span>
</div>
</form>

<div id="menu_nav" class="menu" style="display:none">
<form action="$basename&action=addnav" method="post">
<input type="hidden" name="hid" value="$hid" />
	<div class="admin_table mb10" style="width:700px">
	<h2 class="h1" onmousedown="read.move(event);" style="cursor:move"><a class="del_img fr" href="javascript:;" onclick="closep();">关闭</a>添加楼盘自定义导航</h2>
	<table width="100%" cellspacing="0" cellpadding="0">
		<tr class="tr1 vt">
		  <td class="td2">栏目名称<span class="s1">*</span></td>
		  <td class="td2"><input name="title" type="text" class="input input_wa" id="title" /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">栏目链接</td>
			<td class="td2"><input name="link" type="text" class="input input_wb" id="link" /> (如果是外部链接，要加http://)</td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">字体样式</td>
			<td class="td2">
				<div class="input_img fl mr10"><i title="选择颜色" class="input_color" onclick="showColorPicker(this,'bgcolor',function(){pickReback('bgcolor_s',color_picker)})">选择颜色</i><input id="bgcolor" name="color" class="color_input" type="text" /></div>
				<ul class="fl list_A list_80 cc">
					<li><input name="b" type="checkbox" id="b" value="1" onchange="if (this.checked){getObj('bgcolor_s').style.fontWeight='bolder';}else{getObj('bgcolor_s').style.fontWeight='normal';}" />粗体</li>
					<li><input name="i" type="checkbox" id="i" value="1" onchange="if (this.checked){getObj('bgcolor_s').style.fontStyle='italic';}else{getObj('bgcolor_s').style.fontStyle='normal';}" />斜体</li>
					<li><input name="u" type="checkbox" id="u" value="1" onchange="if (this.checked){getObj('bgcolor_s').style.textDecoration='underline';}else{getObj('bgcolor_s').style.textDecoration='none';}" />下划线</li>
				</ul>
				<span class="fl">(<span id='bgcolor_s'>字体样式效果</span>)</span>
			</td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">文字说明</td>
			<td class="td2"><input name="alt" type="text" class="input input_wb" id="alt"> (鼠标悬浮于链接文字上时的说明内容)</td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">目标框架</td>
			<td class="td2">
				<ul class="list_A list_80 cc">
					<li><input type="radio" name="url_target" value="0" />本窗口</li>
					<li><input type="radio" name="url_target" value="1" />新窗口</li>
				</ul>
			</td>
		</tr>
		<tr class="tr1 vt">
			<td class="td2">位置顺序</td>
			<td class="td2"><input name="view" type="text" class="input input_wa" id="view" value="$view" /></td>
		</tr>
	</table>
	</div>
	<div class="mb10 tac"><span class="btn2"><span><button type="button" onfocus="blur();" onclick="ajax.submit(this.form)">提 交</button></span></span></div>
</form>
</div>
<!--
EOT;
}elseif($action == 'map'){print <<<EOT
-->
	<script type="text/javascript" src="js/pw_ajax.js"></script>
	<script type="text/javascript" src="js/global.js"></script>
	<div class="nav3 mb10">
	    <ul id="basictype" class="cc">
	        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
			<li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">编辑楼盘</a></li>
	    </ul>
	</div>
	<div class="nav4 mb10">
    <ul class="cc">
        <li><a href="$basename&action=edit&hid=$hid" hidefocus="true">基本信息</a></li>
		<li><a href="$basename&action=album&hid=$hid" hidefocus="true">相册</a></li>
        <li><a href="$basename&action=video&hid=$hid" hidefocus="true">视频</a></li>
		<li class="current"><a href="$basename&action=map&hid=$hid" hidefocus="true">地图</a></li>
		<li><a href="$basename&action=pricedetail&hid=$hid" hidefocus="true">价格明细</a></li>
		<li><a href="$basename&action=feed&hid=$hid" hidefocus="true">楼盘动态</a></li>
		<li><a href="$basename&action=colony&hid=$hid" hidefocus="true">关联业主小区</a></li>
		<li><a href="$basename&action=information&hid=$hid" hidefocus="true">关联资讯</a></li>
		<li><a href="$basename&action=nav&hid=$hid" hidefocus="true">自定义导航</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_groupbuy&action=stats&hid=$hid" hidefocus="true">团购管理</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_evaluation&hid=$hid&action=score" hidefocus="true">评价管理</a></li>
	</ul>
	</div>
	<div class="cc" style="width: 100%;">
	<iframe height="600px" scrolling="no" frameborder="no" width="100%" style="border: 0pt none ; display: '';" src="$basename&action=map&step=1&hid=$hid" frameborder="0" ></iframe>
	</div>
<!--
EOT;
}elseif($action == 'pricedetail'){
if (!defined('AJAX')){
print <<<EOT
-->
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript" src="js/global.js"></script>
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
		<li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">编辑楼盘</a></li>
    </ul>
</div>
<div class="nav4 mb10">
   <ul class="cc">
    <li><a href="$basename&action=edit&hid=$hid" hidefocus="true">基本信息</a></li>
	<li><a href="$basename&action=album&hid=$hid" hidefocus="true">相册</a></li>
    <li><a href="$basename&action=video&hid=$hid" hidefocus="true">视频</a></li>
	<li><a href="$basename&action=map&hid=$hid" hidefocus="true">地图</a></li>
	<li class="current"><a href="$basename&action=pricedetail&hid=$hid" hidefocus="true">价格明细</a></li>
	<li><a href="$basename&action=feed&hid=$hid" hidefocus="true">楼盘动态</a></li>
	<li><a href="$basename&action=colony&hid=$hid" hidefocus="true">关联业主小区</a></li>
	<li><a href="$basename&action=information&hid=$hid" hidefocus="true">关联资讯</a></li>
	<li><a href="$basename&action=nav&hid=$hid" hidefocus="true">自定义导航</a></li>
	<li><a href="admin.php?adminjob=mode&admintype=house_groupbuy&action=stats&hid=$hid" hidefocus="true">团购管理</a></li>
	<li><a href="admin.php?adminjob=mode&admintype=house_evaluation&hid=$hid&action=score" hidefocus="true">评价管理</a></li>
</ul>
</div>
<!--
EOT;
}
include PrintMode('pricedetail');
}elseif($action == 'evaluation'){
if (!defined('AJAX')){
print <<<EOT
-->
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script type="text/javascript" src="js/global.js"></script>
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
		<li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">编辑楼盘</a></li>
    </ul>
</div>
<div class="nav4 mb10">
   <ul class="cc">
    <li><a href="$basename&action=edit&hid=$hid" hidefocus="true">基本信息</a></li>
	<li><a href="$basename&action=album&hid=$hid" hidefocus="true">相册</a></li>
    <li><a href="$basename&action=video&hid=$hid" hidefocus="true">视频</a></li>
	<li><a href="$basename&action=map&hid=$hid" hidefocus="true">地图</a></li>
	<li><a href="$basename&action=pricedetail&hid=$hid" hidefocus="true">价格明细</a></li>
	<li><a href="$basename&action=feed&hid=$hid" hidefocus="true">楼盘动态</a></li>
	<li><a href="$basename&action=colony&hid=$hid" hidefocus="true">关联业主小区</a></li>
	<li><a href="$basename" hidefocus="true">关联资讯</a></li>
	<li><a href="$basename" hidefocus="true">自定义导航</a></li>
	<li><a href="admin.php?adminjob=mode&admintype=house_groupbuy&action=stats&hid=$hid" hidefocus="true">团购管理</a></li>
	<li class="current"><a href="admin.php?adminjob=mode&admintype=house_evaluation&hid=$hid&action=score" hidefocus="true">评价管理</a></li>
</ul>
</div>
<!--
EOT;
}
include PrintMode('pricedetail');
}if (!defined('AJAX')){include_once PrintEot('adminbottom');}
?>-->